package com.lanou3g.hm0419;

import java.io.File;

/**
 * Created by dllo on 18/4/20.
 */
public class Main {
    public static void main(String[] args) {

        String rootPath = "/Users/dllo/Desktop/hw/作业/Q1";
        Thread thread = Thread.currentThread();
        System.out.println(thread.getName());
        File rootDir = new File(rootPath); //文件夹

        //获取这个文件夹下的所有文件
        File[] files = rootDir.listFiles();

        for (File file : files) {
            String fileName = file.getName();  //获取文件的文件名
            if (fileName.contains(".txt")) {
                new DelThread(file).start();

            }
        }

    }
}
